package com.turing.data.scripts.contract.transfer

import com.turing.data.vo.out.review.DependParamsVO
import com.turing.data.vo.out.review.TaskElementVO


class IfSetupHolders_30189_10_transfer {

    static List< TaskElementVO.DrawResultVO > doConvert(List< TaskElementVO.DrawResultVO > resultVOs, DependParamsVO dependParams){

        for( drawResultVO in resultVOs ) {
                def childTaskSn = drawResultVO.childTaskSn
                if(null == childTaskSn || childTaskSn == ""){
                    continue
                }
            String modelValue = drawResultVO.text

            String REGEX_HAS_NOT_SETUP_HOLDERS = /.*不设置份额持有人大会.*/

            String REGEX_SETUP_HOLDERS = /.*设置份额持有人大会.*/

            if (modelValue =~ REGEX_HAS_NOT_SETUP_HOLDERS) {
                drawResultVO.businessValue = "否"
                drawResultVO.type = 1
            } else if (modelValue =~ REGEX_SETUP_HOLDERS) {
                drawResultVO.businessValue = "是"
                drawResultVO.type = 1
            } else{
                drawResultVO.businessValue = "否"
                drawResultVO.type = 1
            }
        }

        return resultVOs
    }

}
